module ProjectlogHelper

  include ApplicationHelper
  include ProjectHelper
  include ERB::Util

  def disp_projectlog_information(log)
    task_key = case log.dat_projectcomp.task_kbn
               when 1 then :task#app_localized_message(:label, :task)
               when 2 then :milestone#app_localized_message(:label, :milestone)
               when 3 then :event#app_localized_message(:label, :event)
               end
    task_kbn = app_localized_message(:label, task_key)
    
    user_name   = disp_charge_user_name(log.dat_projectcomp)
    detail_name = disp_detail_name(log.dat_projectcomp)
    user_name   = "" if user_name == "&nbsp;"
    detail_name = "" if detail_name == "&nbsp;"
    
    message = app_localized_message(:label, "log_kbn_" + log.log_kbn.to_s)
    message = sprintf(message, user_name, detail_name, task_kbn)
    message = message.strip
    message
  end
end
